package com.codejam2013.round1c;

import java.io.File;
import java.io.PrintStream;
import java.util.Scanner;


public class B_small {

	static int nTest, X, Y;
	static char[] amoves = new char[100000];
	public static void main(String[] args) throws Exception {
		Scanner scanner = new Scanner(new File("B-in.txt"));
		PrintStream ps = new PrintStream(new File("B-out.txt"));
		System.setOut(ps);
		nTest = scanner.nextInt();
		for (int test=1;test<=nTest;++test) {
			X = scanner.nextInt();
			Y = scanner.nextInt();
			int val = 1;
			int cx,cy, sign, nmoves;
			cx = cy = 0;
			sign = 1;
			nmoves = 0;
			System.out.print("Case #" + test + ": ");
			while (cx != X) {
				cx += sign * val;
				val++;
				if (sign == 1) {
					amoves[nmoves] = 'E';
				}
				else {
					amoves[nmoves] = 'W';
				}
				nmoves++;
				sign = -sign;
			}
			if (Y == 0) {
				for (int i=0;i<nmoves;++i) {
					System.out.print(amoves[i]);
				}
			}
			else {
				if (Y < 0) {
					if (cy - Y >= val) {
						sign = -1;
					}
					else {
						sign = 1;
					}
				}
				else {
					if (Y - cy >= val) {
						sign = 1;
					}
					else {
						sign = -1;
					}
				}
				while (cy != Y) {
					cy += sign * val;
					val++;
					if (sign == 1) {
						amoves[nmoves] = 'N';
					}
					else {
						amoves[nmoves] = 'S';
					}
					nmoves++;
					sign = -sign;
				}
				for (int i=0;i<nmoves;++i) {
					System.out.print(amoves[i]);
				}
			}
			System.out.println();
		}

	}
	
}